#ifndef CONCRETEGAMEPROTOTYPE_H
#define CONCRETEGAMEPROTOTYPE_H
#include "../Control/GamePrototype.h"
#include "Grid.h"
#include "Color.h"
#include <map>
#include <vector>
#include <string>
#include "MobileTile.h"
#include "../Control/Controller.h"
#include "../constantes.h"
#include "../Control/Direction.h"
#include "TileFactory.h"

using namespace std;
using namespace Control;
namespace Model{
	class Game : public GamePrototype
{
private:
	Grid myGrid;
	map<int,Color*> colors;
	MobileTile* freeTile;
	vector<Treasure*> myTreasures;
	vector<Grid::GridIterator*> iterators;
public:
	Game();
	~Game(void);
	Game* clone();
	int addColor(string name);
	void removeColor(int id);
	void initGame();
	MobileTile* getFreeTile();
	void setFreeTileOrientation(Orientation ori);
	void pushTile(int id, int colorId);
	void deplaceColor(int idColor, Direction dir);
	void endDeplacmentColor(int idColor);
	int winner();
	Grid::GridIterator* getGridIterator();
	void initIterators();
	void removeIterator();
	Color* getColor(int id);
	friend class Control::Controller;
};
}
#else
namespace Model{
	class Game;
}
#endif
